<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/view/head.html"/>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
</script>
</head>
<body>
<#include "/common/image_upload.html"/>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: 产品管理 - <@s.m "global.add"/></div>
	<form class="ropt">
		<input type="submit" value="<@s.m "global.backToList"/>" onclick="this.form.action='list';"/>
	</form>
	<div class="clear"></div>
</div>
<@p.form id="jvForm" action="save" labelWidth="12">

<@p.text width="50" colspan="2" label="商品名称" name="name" required="true" class="required" size="70" maxlength="100"/><@p.tr/>

<@p.select colspan="1" width="50" label="产品类型" name="type.id" list=typeList listKey="id" listValue="name"/>
<@p.select colspan="1" width="50" label="产品分类" name="group.id" list=groupList listKey="id" listValue="name"/><@p.tr/>

<@p.td label="销售区域" colspan="2" >
	<label><input type='checkbox' onclick='Pn.checkbox("cities",this.checked)'/> <@s.m "magic.selectall"/></label>
	<@p.checkboxlist list=cityList listKey="id" listValue="name" name="cities"/>
</@p.td>
<@p.tr/>

<@p.text width="50" colspan="1" label="分销价格" name="partnerPrice" size="30" required="true" class="required"/>
<@p.text width="50" colspan="1" label="成本价格" name="productPrice" size="30" required="true" class="required"/><@p.tr/>

<@p.text width="50" colspan="1" label="建议价格" name="referPrice" size="30" required="true" class="required"/>
<@p.text width="50" colspan="1" label="市场价格" name="marketPrice" size="30" required="true" class="required"/><@p.tr/>

<@p.text width="50" colspan="1" label="可售数量" name="maxCount" size="30" value="0" required="true" class="required digits"/>
<@p.text width="50" colspan="1" label="虚拟购买" name="preCount" size="30" value="0" required="true" class="required digits"/><@p.tr/>

<@p.text width="50" colspan="1" label="开始时间" name="beginTime" size="30" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
<@p.text width="50" colspan="1" label="结束时间" name="endTime" size="30" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/><@p.tr/>

<@p.text width="50" colspan="1" label="过期时间" name="expireTime" size="30" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
<@p.text width="50" colspan="1" label="优先级" name="order" value="1" size="30" required="true" class="required digits"/><@p.tr/>

<@p.text width="50" colspan="2" label="购买选项" name="options" size="70"/><@p.tr/>
<@p.radio colspan="2" label="递送方式" name="delivery" value="coupon" list=deliveryList listKey="enname" listValue="name" required="true" class="required"/><@p.tr/>

<@p.text width="50" colspan="2" label="短信标题" name="smsTitle" size="70" required="true" class="required" help="建议写产品名称简称"/><@p.tr/>
<@p.textarea colspan="2" label="短信内容模板" name="smsTemplate" maxlength="255" cols="70" rows="5" required="true" class="required" helpPosition="3" help="可编辑短信发送内容，其中[订单号]表示订单号，[产品]表示短信名称，[有效期]表示产品有效期，[电话]代表商户电话，[商户]代表商户名称，[地址]代表商户地址，[张数]代表张数，[编号]代表编号。"/><@p.tr/>

<@p.td label="产品缩略图" colspan="1" width="50" noHeight="true">
<@p.text id="uploadImgPath1" name="imgPhoto" readonly="readonly" size="24"/><input type="button" value="清空" onclick="clearImg(1);"/><br/>
<span id="ufc1"><input type="file" id="uploadFile1" size="20"/></span> <input type="button" value="上传" onclick="upload(1);"/><br/>
</@p.td><@p.td colspan="1" width="50">
<img id="preImg1" alt="预览区" noResize="true" style="width:100px;height:70px;background-color:#CCCCCC;border:1px solid #333"/>
</@p.td><@p.tr/>

<@p.textarea colspan="2" label="产品简介" name="summary" maxlength="255" cols="70" rows="5"/><@p.tr/>
<@p.textarea colspan="2" label="产品详情" name="detail" maxlength="255" cols="70" rows="5"/><@p.tr/>
<@p.textarea colspan="2" label="产品提示" name="hint" maxlength="255" cols="70" rows="5"/><@p.tr/>

<@p.radio width="50" colspan="2" label="是否启用" name="enable" value="true" list={"true":"启用","false":"禁用"}/><@p.tr/>

<@p.td colspan="2"><@p.submit code="global.submit"/> &nbsp; <@p.reset code="global.reset"/></@p.td>
</@p.form>
</div>
</body>
</html>
